package com.wish.wishsystem_management.controller;


import com.wish.wishsystem_management.entity.SysRegion;
import com.wish.wishsystem_management.service.ISysRegionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import vo.ResultEntity;

import java.util.List;

/**
 * <p>
 * 地区表 前端控制器
 * </p>
 *
 * @author zhaiwj
 * @since 2021-03-22
 */
@RestController
@RequestMapping("/sysRegion")
public class SysRegionController {

    @Autowired
    private ISysRegionService iSysRegionService;


    @RequestMapping("/list")
    public ResultEntity list(Integer parentId) {
            List<SysRegion> sysRegionList = iSysRegionService.queryRegionList(parentId);
            return ResultEntity.ok("200", "地区表", sysRegionList);


    }
}

